<?php 
/**
 * Sector entity view
 * 
 *
 */

$sector = $vars['entity'];

echo "<h2>$sector->title </h2>";

$relacion = array(
		'relationship' => 'viaPerteneceSector',
		'relationship_guid' => $sector->getGUID(),
		'inverse_relationship' => true
);

$vias = elgg_get_entities_from_relationship($relacion);

echo '<h3>Vias del Sector:</h3>';
echo "<div style='margin-left: 10px;'>";
foreach ($vias as $via){
	echo elgg_view('climbia/via/full',array('entity' => $via));
}
echo "</div>";
?>